package com.macken.zjh.entity;

import com.badlogic.gdx.scenes.scene2d.ui.Image;
import com.badlogic.gdx.scenes.scene2d.ui.ImageButton;
import com.badlogic.gdx.scenes.scene2d.ui.TextField;
import com.badlogic.gdx.utils.Disposable;

public class Player implements Disposable {

	public static final int NOBODY = 0;// pid为0 表示为无人
	public static final byte DEFAULT_POSITION = 0;// 未确定位置

	public int pid;// 玩家编号
	public byte state;// 玩家状态
	public int money;// 玩家金币
	public byte serverPos;// 玩家服务器位置
	public byte clientPos;// 玩家客户端位置
	public Image stateImg;
	public Image pokerImg;
	public Image prepareImg;
	public ImageButton btnP;
	public TextField nickname;

	@Override
	public void dispose() {
		if (this.stateImg != null) {
			this.stateImg.remove();
		}
		if (this.pokerImg != null) {
			this.pokerImg.remove();
		}
		if (this.prepareImg != null) {
			this.prepareImg.remove();
		}
		if (this.btnP != null) {
			this.btnP.remove();
		}
		if (this.nickname != null) {
			this.nickname.remove();
		}

	}
}
